翻訳と辞書
Words near each other
・ Uniform theory of diffraction
・ Uniform tiling
・ Uniform (disambiguation)
・ Uniform (film)
・ Uniform 1 k2 polytope
・ Uniform 10-polytope
・ Uniform 2 k1 polytope
・ Uniform 4-polytope
・ Uniform 5-polytope
・ Uniform 6-polytope
・ Uniform 7-polytope
・ Uniform 8-polytope
・ Uniform 9-polytope
・ Uniform absolute continuity
・ Uniform absolute-convergence
Uniform access principle
・ Uniform Act
・ Uniform Adoption Act
・ Uniform algebra
・ Uniform Anatomical Gift Act
・ Uniform and insignia of the Boy Scouts of America
・ Uniform antiprismatic prism
・ Uniform antshrike
・ Uniform Apportionment of Tort Responsibility Act
・ Uniform Appraisal Dataset
・ Uniform Arbitration Act
・ Uniform Bar Examination
・ Uniform beret
・ Uniform Bill of Lading Act
・ Uniform binary search


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Uniform access principle : ウィキペディア英語版
Uniform access principle

The Uniform Access Principle was put forth by Bertrand Meyer (originally in ''Object-Oriented Software Construction''). It states "All services offered by a module should be available through a uniform notation, which does not betray whether they are implemented through storage or through computation".〔(【引用サイトリンク】url=http://c2.com/cgi/wiki?UniformAccessPrinciple )〕 This principle applies generally to the syntax of object-oriented programming languages. In simpler form, it states that there should be no difference between working with an attribute, precomputed property, or method/query.
While most examples focus on the "read" aspect of the principle, Meyer shows that the "write" implications of the principle are harder to deal with in his monthly column on the Eiffel programming language official website.
==Explanation==
The problem being addressed by Meyer involves the maintenance of large software projects or software libraries. Sometimes when developing or maintaining software it is necessary, after much code is in place, to change a class or object in a way that transforms what was simply an attribute access into a method call. Programming languages often use different syntax for attribute access and invoking a method, (e.g. obj.something versus obj.something()). The syntax change would require, in popular programming languages of the day, changing the source code in all the places where the attribute was used. This might require changing source code in many different locations throughout a very large volume of source code. Or worse, if the change is in an object library used by hundreds of customers, each of those customers would have to find and change all the places the attribute was used in their own code and recompile their programs.
Going the reverse way (from method to simple attribute) really wasn't a problem, as one can always just keep the function and have it simply return the attribute value.
Meyer recognized the need for software developers to write code in such a way as to minimize or eliminate cascading changes in code that result from changes which convert an object attribute to a method call or vice versa. For this he developed the Uniform Access Principle.
Many programming languages do not strictly support the UAP but do support forms of it. Properties, which are provided in a number of programming languages, address the problem Meyer was addressing with his UAP in a different way. Instead of providing a single uniform notation, properties provide a way to invoke a method of an object while using the same notation as is used for attribute access. The separate method invocation syntax is still available.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Uniform access principle」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.